package com.framework.buss.bridge.model;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import com.framework.core.mybatis.config.AutoField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;


@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("buss_bridge_template")
@ApiModel(value="buss_bridge_template", description="桥梁表")
public class BridgeTemplate implements Serializable {
	private static final long serialVersionUID = 4013193970046502756L;
	/**主键*/
	@TableId(type = IdType.INPUT)
	@ApiModelProperty(value = "主键")
	@AutoField("varchar(32) default '' COMMENT '主键'")
	private String id;

	@ApiModelProperty(value = "key值")
	@AutoField("varchar(50) default '' COMMENT 'key值'")
	private String title;

	@ApiModelProperty(value = "类型： 默认String，Image，Array")
	@AutoField("varchar(10) default '' COMMENT '类型'")
	private String type;

	@ApiModelProperty(value = "配置数据表，Sql查询")
	@AutoField("varchar(20) default '' COMMENT '配置数据表'")
	private String dataFrom;

	@ApiModelProperty(value = "数据来源表")
	@AutoField("varchar(20) default '' COMMENT '数据来源表'")
	private String sourceTable;

	@ApiModelProperty(value = "数据来源查询sql")
	@AutoField("text default '' COMMENT '数据来源查询sql'")
	private String sourceSql;

	@ApiModelProperty(value = "类型： 默认值")
	@AutoField("varchar(20) default '' COMMENT '默认值'")
	private String defaultValue;

	@ApiModelProperty(value = "上级编号")
	@AutoField("varchar(32) default '' COMMENT '上级编号'")
	private String pid;

	@ApiModelProperty(value = "桥梁编号")
	@AutoField("varchar(32) default '' COMMENT '上级编号'")
	private String bridgeId;

	@ApiModelProperty(value = "排序")
	@AutoField("bigint default 0 COMMENT '排序'")
	private long sort;

	@ApiModelProperty(value = "是否子节点")
	@AutoField("tinyint default 0 COMMENT '排序'")
	private boolean isLeaf;

	@ApiModelProperty(value = "版本")
	@Version
	private long version;
}
